package com.project_doctor.code;


/**
 * 枚举封装系统级别的状态码
 */
public enum SystemCode implements ResultCode {
    // 定义枚举对象
    SUCCESS(200, "操作成功"),
    UPDATE_SUCCESS(200, "修改成功"),
    ADD_SUCCESS(200, "新增成功"),
    APPROVED_SUCCESS(200, "审核通过"),
    SERVICE_SUCCESS(200, "服务完成"),
    CANCEL_SUCCESS(200, "服务取消"),
    REJECT_SUCCESS(200, "服务驳回"),
    DELETE_SUCCESS(200, "删除成功"),
    FAIL(500, "操作失败"),
    SUCCESS_SMS(200, "发送手机验证码成功"),
    SUCCESS_LOGOUT(200, "注销成功"),
    SUCCESS_Edit_PersonalProfile(200, "修改个人信息成功"),
    SUCCESS_Edit_PASSWORD(200, "修改密码成功"),
    SUCCESS_Edit_ANNOUNCEMENT(200, "修改公告成功"),
    SUCCESS_NEW_ANNOUNCEMENT(200, "新增公告成功"),
    SUCCESS_DELETE_ANNOUNCEMENT(200, "删除公告成功"),
    SUCCESS_UPLOAD_ANNOUNCEMENT(200, "上传公告文件成功"),
    SUCCESS_MARKASREAD_ANNOUNCEMENT(200, "标记已读成功"),
    FAIL_Edit_PersonalProfile(501, "修改个人信息失败"),
    SUCCESS_MARKASREAD_PRIVATE(200, "标记已读成功");


    private Integer code;
    private String message;

    SystemCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取状态码
     */
    @Override
    public Integer getCode() {
        return this.code;
    }

    /**
     * 获取状态信息
     */
    @Override
    public String getMessage() {
        return this.message;
    }

}
